<template>
  <div class="join_container">
    <div class="join_content">
      <div class="join_title">新用户注册</div>
      <div class="join_title_two">很高兴您将成为商城的会员（注册只需一步）</div>

      <div class="join_form">
        <van-form @submit="onSubmit">
          <van-field
            v-model="phone"
            name="用户名"
            placeholder="手机号码"
            :rules="[{ required: true, message: '请填写手机号码' }]"
          />
          <van-field
            v-model="password"
            type="password"
            name="密码"
            placeholder="密码"
            :rules="[{ required: true, message: '请填写密码' }]"
          />
          <van-field
            v-model="username"
            name="用户名"
            placeholder="确认密码"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="username1"
            name="用户名"
            placeholder="用户名"
            :rules="[{ required: true, message: '' }]"
          />
          <!-- <div>{{join}}</div> -->

          <van-field
            v-model="phone1"
            name="用户名"
            :rules="[{ required: true, message: '' }]"
          />

          <div style="margin: 16px">
            <van-button round block type="info" native-type="submit">
              提交
            </van-button>
          </div>
        </van-form>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      username: "",
      username1:"",
      password: "",
      phone: "",
      phone1:"",
      join: [],
    };
  },
  methods: {
    onSubmit() {
      this.$API.getregister(params).then(res=>{
          console.log(res);
      })
    },
  },
  mounted() {
    this.$API.getregister().then((res) => {
      console.log(res);
      this.join = res.data;
    });
  },
};
</script>

<style scoped>
.join_container {
  width: 90%;
  height: 13rem;
  border: 1px solid rgb(216, 214, 214);
  border-radius: 0.2rem;
  margin: 0 auto;
  margin-top: 0.5rem;
}
.join_content {
  width: 90%;
  height: 100%;
  border: 1px solid #000;
  margin: 0 auto;
}
.join_title {
  font-size: 0.6rem;
  margin-top: 0.5rem;
}
.join_form {
  margin-top: 0.5rem;
}
.join_title_two {
  margin-top: 0.3rem;
  font-size: 0.3rem;
  color: rgb(172, 169, 169);
}
</style>